package com.lsk.mytuan.util;

public class FloatCalc {
    private static final int k = 100;

    private static float round (float f) {
        float a = f * k;
        return a / (float) k; 
    }

    public static float fadd (float f1, float f2) {
        return round(f1 + f2);
    }

    public static float fdec (float f1, float f2) {
        return round(f1 - f2);
    }

    public static float fmul (float f1, float f2) {
        return round(f1 * f2);
    }

    public static float fdiv (float f1, float f2) {
        return round(f1 / f2);
    }
}
